package ar.com.lemil.bb.http.vo;

import javax.microedition.io.HttpConnection;

public class HttpPing {
	private boolean success = false;
	private long time = 0;
	private long ttl = 0;
	private String url;
	private int responseCode = 0;

	public HttpPing(boolean success, long time, long ttl, String url) {
		super();
		this.success = success;
		this.time = time;
		this.ttl = ttl;
		this.url = url;
	}
	public boolean isSuccess() {
		return success;
	}
	public void setSuccess(boolean success) {
		this.success = success;
	}
	public long getTime() {
		return time;
	}
	public void setTime(long time) {
		this.time = time;
	}
	public long getTtl() {
		return ttl;
	}
	public void setTtl(long ttl) {
		this.ttl = ttl;
	}
	public int getResponseCode() {
		return responseCode;
	}
	public void setResponseCode(int responseCode) {
		this.responseCode = responseCode;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	
	public String toString() {
		//Reply from 209.85.195.104: bytes=32 time=48ms TTL=51
		long l = this.ttl/1000;
		String r = "Reply HTTP=" + this.responseCode + " time=" + this.time + "ms TTL=" + l + "s";
		return r;
	}
	
	
}

